package com.miniprogram.admin.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.miniprogram.bean.po.AdminUser;
import com.miniprogram.admin.mapper.AdminUserMapper;
import com.miniprogram.admin.service.IAdminUserService;
import com.miniprogram.common.service.BaseServiceImpl;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 * 后台用户表 服务实现类
 * </p>
 *
 * @author lin
 * @since 2022-06-21
 */
@Service
@Slf4j
@Transactional(rollbackFor = Exception.class)
public class AdminUserServiceImpl extends BaseServiceImpl<AdminUserMapper, AdminUser> implements IAdminUserService {

    @Override
    public AdminUser findByAccount(String account) {
        return this.baseMapper.selectOne(new QueryWrapper<AdminUser>().eq("account", account));
    }
}
